package com.zyh.system.JDsupermarkt.domain;

/**
 * @Author zyh
 * @Date 2024/8/2 19:35
 * @Description
 */

public class BuyCar{
    private String goodsName;
    private Double goodsPrice;
    private Integer buyNum;
    private Double money;

    public BuyCar() {
    }

    public BuyCar(String goodsName, Double goodsPrice, Integer buyNum, Double money) {
        this.goodsName = goodsName;
        this.goodsPrice = goodsPrice;
        this.buyNum = buyNum;
        this.money = money;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Double getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(Double goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public Integer getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(Integer buyNum) {
        this.buyNum = buyNum;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "BuyCar{" +
                "goodsName='" + goodsName + '\'' +
                ", goodsPrice=" + goodsPrice +
                ", buyNum=" + buyNum +
                ", money=" + money +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BuyCar buyCar = (BuyCar) o;

        if (goodsName != null ? !goodsName.equals(buyCar.goodsName) : buyCar.goodsName != null) return false;
        if (goodsPrice != null ? !goodsPrice.equals(buyCar.goodsPrice) : buyCar.goodsPrice != null) return false;
        if (buyNum != null ? !buyNum.equals(buyCar.buyNum) : buyCar.buyNum != null) return false;
        return money != null ? money.equals(buyCar.money) : buyCar.money == null;
    }

    @Override
    public int hashCode() {
        int result = goodsName != null ? goodsName.hashCode() : 0;
        result = 31 * result + (goodsPrice != null ? goodsPrice.hashCode() : 0);
        result = 31 * result + (buyNum != null ? buyNum.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        return result;
    }


}
